﻿Imports Mysoft.Map.Application
Imports System.Web
Imports System.Data
Imports Mysoft.Map.Data
Imports System.Data.SqlClient
Imports System.Web.UI
Imports Mysoft.Map.Caching
Imports System.Xml

Public Class JdjfMng
    '设置购房意向的选项值
    Public Sub SetGfyxValue(ByVal a_page As Page, Optional ByVal a_OppGUID As String = "", Optional ByVal a_BlnNew As Boolean = True)
        Dim sGfyx As New System.Text.StringBuilder
        Dim dtGfyx As DataTable
        Dim pub As New Mysoft.Slxt.Business.PublicMng
        Dim i As Integer
        Dim strSelectedValue As String = String.Empty

        sGfyx.Append("<TABLE cellSpacing=0 cellPadding=0><TBODY><TR>")
        dtGfyx = pub.GetParamFromCache("s_Gfyx", "集团")
        For i = 0 To dtGfyx.Rows.Count - 1
            sGfyx.Append("<TD><INPUT onclick=""setNextContentValue();gfyxChange();"" class=rad2 id=appForm_Gfyx" & i.ToString() & " type=radio value=" & dtGfyx.Rows(i).Item("Text").ToString & " name=appForm_Gfyx></TD>")
            sGfyx.Append("<TD class=radioLabel><LABEL for=appForm_Gfyx" & i.ToString() & ">" & dtGfyx.Rows(i).Item("Text").ToString & "</LABEL></TD>")

            strSelectedValue = "<INPUT class=rad3 type=hidden value=" & dtGfyx.Rows(i).Item("Text").ToString & " name=Gfyx req=1 ro=0>" '默认最后一个
        Next


        If Not a_BlnNew Then
            For i = 0 To dtGfyx.Rows.Count - 1
                Dim strGfyx As String = MyDB.GetDataItemString("SELECT Gfyx FROM dbo.s_Opportunity Where OppGUID ='" & a_OppGUID & "'")
                If strGfyx = dtGfyx.Rows(i).Item("Text").ToString Then
                    strSelectedValue = "<INPUT class=rad3 type=hidden value=" & strGfyx & " name=Gfyx req=1 ro=0>" '机会的购房意向
                End If
            Next
        End If
        sGfyx.Append("</TR></TBODY></TABLE>")
        a_page.ClientScript.RegisterStartupScript(Me.GetType(), "Gfyx", "appForm.Gfyx.previousSibling.outerHTML='" & sGfyx.ToString() & "'; appForm.Gfyx.outerHTML = '" & strSelectedValue & "';", True)
    End Sub

    '设置关键行为的选项值
    Public Sub SetGjxwValue(ByVal a_page As Page)
        Dim sGjxw As New System.Text.StringBuilder
        Dim dtGjxw As DataTable
        Dim pub As New Mysoft.Slxt.Business.PublicMng
        Dim i As Integer
        sGjxw.Append("<TABLE style='TABLE-LAYOUT: fixed' cellSpacing=0 cellPadding=0 width='100%'><TBODY><TR><TD id=tdGjxw width=90>关键行为 </TD>")
        dtGjxw = pub.GetParamFromCache("s_Gjxw", "集团")
        For i = 0 To dtGjxw.Rows.Count - 1
            sGjxw.Append("<TD><INPUT id='Gjxw" & dtGjxw.Rows(i).Item("Value").ToString().Replace(".", String.Empty) & "' style='BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; WIDTH: 20px; BORDER-BOTTOM: medium none' onclick=FormChanged()  type=checkbox name=chkGjxw>" & dtGjxw.Rows(i).Item("Text").ToString() & "</TD>")
        Next
        sGjxw.Append("</TR></TBODY></TABLE>")
        a_page.ClientScript.RegisterStartupScript(Me.GetType(), "Gjxw", "_td_appForm_Gjxw.innerHTML=""" & sGjxw.ToString() & """;", True)
    End Sub

    Public Function GetMainMedia() As DataTable
        Dim strSql As String = "SELECT MainMediaName AS [Text],MainMediaCode AS [Value] FROM s_MainMedia Order By MainMediaCode"
        Dim DTTemp As DataTable

        ' 声明缓存Key
        Dim strCacheKey As String = "MainMedia"

        DTTemp = Mysoft.Map.Caching.MyCache.Get(strCacheKey)
        If Not DTTemp Is Nothing Then
            Return DTTemp
        End If

        DTTemp = MyDB.GetDataTable(strSql)
        If DTTemp.Rows.Count > 0 Then
            Mysoft.Map.Caching.MyCache.Insert(strCacheKey, DTTemp, DateTime.Now.AddMinutes(20), TimeSpan.Zero, Nothing)
            Return DTTemp
        Else
            Return DTTemp
        End If
    End Function

    Public Function SaveGjjl2(ByVal strXml As String) As String
        Dim xmlDOM As New XmlDocument
        Dim STR_FAIL_EMPTY As String = "FAIL_EMPTY"
        Dim STR_SUCCESS As String = "SUCCESS"
        Dim STR_FAIL_BC As String = "FAIL_BC"
        xmlDOM.LoadXml(strXml)
        Dim node As XmlNode = xmlDOM.SelectSingleNode("s_Opp2Gjjl/Gjfs")
        If node Is Nothing Then
            Return STR_FAIL_EMPTY
        End If

        If node.InnerText = String.Empty Then
            Return STR_FAIL_EMPTY
        End If

        node = xmlDOM.SelectSingleNode("s_Opp2Gjjl/Gfyx")
        If node Is Nothing Then
            Return STR_FAIL_EMPTY
        End If

        If node.InnerText = String.Empty Then
            Return STR_FAIL_EMPTY
        End If

        node = xmlDOM.SelectSingleNode("s_Opp2Gjjl/NextDate")
        If node Is Nothing Then
            Return STR_FAIL_EMPTY
        End If

        If node.InnerText = String.Empty Then
            Return STR_FAIL_EMPTY
        End If

        node = xmlDOM.SelectSingleNode("s_Opp2Gjjl/Status")
        If node Is Nothing Then
            Return STR_FAIL_EMPTY
        End If

        If node.InnerText = String.Empty Then
            Return STR_FAIL_EMPTY
        End If

        node = xmlDOM.SelectSingleNode("s_Opp2Gjjl/GjDate")
        If node Is Nothing Then
            Return STR_FAIL_EMPTY
        End If

        If node.InnerText = String.Empty Then
            Return STR_FAIL_EMPTY
        End If

        node = xmlDOM.SelectSingleNode("s_Opp2Gjjl/OppGUID")
        If node Is Nothing Then
            Return STR_FAIL_EMPTY
        End If

        If node.InnerText = String.Empty Then
            Return STR_FAIL_EMPTY
        End If

        node = xmlDOM.SelectSingleNode("s_Opp2Gjjl/GjrGUID")
        If node Is Nothing Then
            Return STR_FAIL_EMPTY
        End If

        If node.InnerText = String.Empty Then
            Return STR_FAIL_EMPTY
        End If

        If MyDB.SaveXml(strXml) <> String.Empty Then
            Return STR_SUCCESS
        Else
            Return STR_FAIL_BC
        End If

    End Function

    ''' <summary>
    ''' 获取机会最终的客户状态
    ''' </summary>
    ''' <param name="strOppGUID">当前机会GUID</param>
    ''' <param name="strTradeGUID">要排除的交易GUID</param>
    ''' <returns>
    '''     机会状态
    '''     ""：查找失败或无记录
    ''' </returns>
    ''' 创建者：李国栋
    ''' 创建日期：2011-01-13
    ''' 修改日期：2011-01-21
    Function GetOppStatus(ByVal strOppGUID As String, Optional ByVal strTradeGUID As String = Nothing) As String

        Dim strSQL As String
        Dim status As Integer

        '1.获取该机会对应的交易记录数
        strSQL = "SELECT isnull(max(case when RoomStatus='签约' then 2 else 1 end),0) as status FROM s_Trade WHERE OppGUID='" & strOppGUID & "' AND TradeStatus='激活' AND RoomStatus in ('小订','认购','签约')"
        If Not String.IsNullOrEmpty(strTradeGUID) Then
            strSQL &= " AND TradeGUID<>'" & strTradeGUID & "'"
        End If
        status = MyDB.GetDataItemInt(strSQL)

        Select Case status
            Case 0
                '2.1.判断是否存在该机会对应的预约单
                strSQL = "SELECT count(8) FROM s_Booking WHERE OppGUID='" & strOppGUID & "' AND Status in('待处理','排号')"
                If MyDB.GetDataItemInt(strSQL) > 0 Then
                    '2.1.1.预约单表中存在该机会对应的记录，则返回“预约”
                    Return "预约"
                Else

                    '如果存在预留单，则返回“看房”
                    '如果不存在预留单，则返回“丢失”
                    strSQL = "SELECT COUNT(*) FROM s_Trade WHERE OppGUID='" & strOppGUID & "' AND RoomStatus='预留' AND TradeStatus='激活'"
                    If MyDB.GetDataItemInt(strSQL) > 0 Then
                        Return "看房"
                    Else
                        Return "丢失"
                    End If

                End If
            Case 1
                '2.2.如果没有签约，则为“认购”
                Return "认购"
            Case Else
                '2.3.如果存在签约，则为“签约”
                Return "签约"
        End Select

    End Function

    ''' <summary>
    ''' 获取机会下一次的跟进信息
    ''' </summary>
    ''' <param name="strStatus">当前的客户状态</param>
    ''' <param name="strGfyx">当前选择的购房意向</param>
    ''' <param name="strProjGUID">当前项目GUID</param>
    ''' <returns>
    '''     下次跟进日期、下次跟进内容：ex."2010-01-01 12:00:00|下次跟进时需锁定客户意向"
    '''     ""：没有查找到信息或参数格式有误
    ''' </returns>
    ''' 创建者：李国栋
    ''' 创建日期：2011-01-13
    Function GetNextGjInfo(ByVal strStatus As String, ByVal strGfyx As String, ByVal strProjGUID As String) As String
        Dim strSQL As String
        Dim timeSpacing, nowTimeSpacing As Integer
        Dim strContent As String
        Dim dtHfTimeSet As DataTable
        Dim strNextTime As String
        Dim strSqlFilter As String = String.Empty
        If String.IsNullOrEmpty(strProjGUID) Then
            Return ""
        End If

        If strStatus <> String.Empty Then
            strSqlFilter = "TimePoint='" & strStatus & "'"
        End If

        If strGfyx <> String.Empty Then
            If strSqlFilter = String.Empty Then
                strSqlFilter = "TimePoint='" & strGfyx & "'"
            Else
                strSqlFilter &= " OR TimePoint='" & strGfyx & "'"
            End If
        End If

        '1.通过“客户状态”、“购房意向”的值，根据“回访追访时间设置”业务参数（s_HfTimeSet）取对应的“时间间隔”和“下次跟进内容”
        strSQL = "SELECT TimePoint,TimeSpacing,[Content] FROM s_HfTimeSet WHERE ProjGUID='" & strProjGUID & "' AND (" & strSqlFilter & ") AND TimeSpacing IS NOT NULL"
        dtHfTimeSet = MyDB.GetDataTable(strSQL)

        If dtHfTimeSet.Rows.Count = 0 Then
            Return "|"
        End If

        '2.找出间隔时间最短的记录
        timeSpacing = Integer.MaxValue
        For Each row As DataRow In dtHfTimeSet.Rows
            nowTimeSpacing = row("TimeSpacing")
            If timeSpacing > nowTimeSpacing Then
                timeSpacing = nowTimeSpacing
                strContent = row("Content")
            ElseIf timeSpacing = nowTimeSpacing Then
                '2.2.如果间隔相同，则优先取购房意向的
                If row("TimePoint") = strGfyx Then
                    timeSpacing = nowTimeSpacing
                    strContent = row("Content")
                End If
            End If
        Next
        If timeSpacing = Integer.MaxValue Then
            Return "|"
        End If

        '3.通过当前日期加上时间间隔算出下次跟进日期
        strNextTime = DateTime.Now.AddDays(timeSpacing).ToString("yyyy-MM-dd")

        '4.返回处理后的结果
        Return strNextTime & "|" & strContent
    End Function

    ''' <summary>
    ''' 对机会的跟进记录进行保存
    ''' </summary>
    ''' <param name="sXML">传入当前客户机会的跟进记录信息。ex."<s_Opp2Gjjl><OppGUID>DDDF80B1-43E7-464C-99E0-2C9D3DCFA1BE</OppGUID><Gfyx >必买</Gfyx>……</s_Opp2Gjjl>"</param>
    ''' <param name="strCstGUID2">选择的客户GUID</param>
    ''' <returns>
    '''     "SUCCESS"：保存成功
    '''     "FAIL_EMPTY"：保存失败，“跟进方式”、“购房意向”、“下次跟进日期”、“客户状态”、“销售机会GUID”、“跟进人GUID”、“跟进日期”其中一个或多个值为空
    '''     "FAIL_BC"：保存失败
    ''' </returns>
    ''' 创建者：李国栋
    ''' 创建日期：2011-01-13
    Function SaveGjjl(ByVal sXML As String) As String
        Dim xmlDoc As New XmlDocument
        Dim strSQL As String
        Dim strGjjlGUID, strOppGUID, strStatus, strGfyx, strGjDate, strGjrGUID, strGjfs, strGjxw, strGjContent, strNextDate, strNextContent, strRemark As String

        '1.加载数据
        If String.IsNullOrEmpty(sXML) Then
            Return "FAIL_EMPTY"
        End If
        Try
            xmlDoc.LoadXml(sXML)
        Catch ex As Exception
            Return "FAIL_BC"
        End Try
        For Each node As XmlNode In xmlDoc.DocumentElement.ChildNodes
            Select Case node.Name
                Case "OppGUID"  '销售机会GUID
                    strOppGUID = node.InnerText
                    Exit Select
                Case "Status"   '客户状态
                    strStatus = node.InnerText
                    Exit Select
                Case "Gfyx"     '购房意向
                    strGfyx = node.InnerText
                    Exit Select
                Case "GjDate"   '跟进日期
                    strGjDate = node.InnerText
                    Exit Select
                Case "GjrGUID"   '跟进人GUID
                    strGjrGUID = node.InnerText
                    Exit Select
                Case "Gjfs"     '跟进方式
                    strGjfs = node.InnerText
                    Exit Select
                Case "Gjxw"     '关键行为
                    strGjxw = node.InnerText
                    Exit Select
                Case "GjContent"    '跟进内容
                    strGjContent = node.InnerText
                    Exit Select
                Case "NextDate" '下次跟进日期
                    strNextDate = node.InnerText
                    Exit Select
                Case "NextContent"   '下次跟进内容
                    strNextContent = node.InnerText
                    Exit Select
                Case "Remark"   '备注说明
                    strRemark = node.InnerText
                    Exit Select
                Case "GjjlGUID" '跟进记录GUID
                    strGjjlGUID = node.InnerText
                    Exit Select
            End Select
        Next

        '2.保存前校验
        '2.1.“跟进方式”、“购房意向”、“客户状态”、“销售机会GUID”、“跟进人GUID”、“跟进日期”不能为空
        '2.2. “下次跟进日期”ERP256SP2中修改，可以为空
        If String.IsNullOrEmpty(strGjfs) _
            OrElse String.IsNullOrEmpty(strGfyx) _
            OrElse String.IsNullOrEmpty(strStatus) _
            OrElse String.IsNullOrEmpty(strOppGUID) _
            OrElse String.IsNullOrEmpty(strGjrGUID) _
            OrElse String.IsNullOrEmpty(strGjDate) _
            Then
            Return "FAIL_EMPTY"
        End If

        '3.保存数据
        If String.IsNullOrEmpty(strGjjlGUID) Then
            strGjjlGUID = Guid.NewGuid.ToString

            strSQL = "INSERT INTO s_Opp2Gjjl(GjjlGUID,OppGUID,Status,Gfyx,GjDate,GjrGUID,Gjfs,Gjxw,GjContent,NextDate,NextContent,Remark)" & _
                    " VALUES('" & strGjjlGUID & "'" & _
                            ",'" & strOppGUID & "'" & _
                            ",'" & strStatus & "'" & _
                            ",'" & strGfyx & "'" & _
                            ",'" & strGjDate & "'" & _
                            ",'" & strGjrGUID & "'" & _
                            ",'" & strGjfs & "'" & _
                            ",'" & strGjxw & "'" & _
                            ",'" & strGjContent & "'" & _
                            "," & IIf(String.IsNullOrEmpty(strNextDate), "NULL", String.Format("'{0}'", strNextDate)) & "" & _
                            ",'" & strNextContent & "'" & _
                            ",'" & strRemark & "'" & _
                    ");"
            strSQL &= "UPDATE s_Opportunity SET LastGjjlGUID='" & strGjjlGUID & "' WHERE OppGUID='" & strOppGUID & "'"
        Else
            strSQL = "UPDATE s_Opp2Gjjl SET" & _
                            " OppGUID='" & strOppGUID & "'" & _
                            ",Status='" & strStatus & "'" & _
                            ",Gfyx='" & strGfyx & "'" & _
                            ",GjDate='" & strGjDate & "'" & _
                            ",GjrGUID='" & strGjrGUID & "'" & _
                            ",Gjfs='" & strGjfs & "'" & _
                            ",Gjxw='" & strGjxw & "'" & _
                            ",GjContent='" & strGjContent & "'" & _
                            ",NextDate=" & IIf(String.IsNullOrEmpty(strNextDate), "NULL", String.Format("'{0}'", strNextDate)) & "" & _
                            ",NextContent='" & strNextContent & "'" & _
                            ",Remark='" & strRemark & "'" & _
                    " WHERE GjjlGUID='" & strGjjlGUID & "'"
            strSQL &= "UPDATE s_Opportunity SET LastGjjlGUID='" & strGjjlGUID & "' WHERE OppGUID='" & strOppGUID & "'"
        End If


        If MyDB.ExecSQL(strSQL) < 0 Then
            Return "FAIL_BC"
        Else
            Return "SUCCESS"
        End If
    End Function

    ''' <summary>
    ''' 保存机会的状态、下次跟进内容等信息
    ''' </summary>
    ''' <param name="sXML">传入当前客户机会的跟进记录信息。ex."<s_Opp><OppGUID>DDDF80B1-43E7-464C-99E0-2C9D3DCFA1BE</OppGUID><Status >认购</ Status >……</s_Opp>"</param>
    ''' <returns>
    '''     "SUCCESS"：保存成功
    '''     "FAIL_EMPTY"：保存失败，“销售机会GUID”、“客户状态”、“修改人”其中一个或多个值为空
    '''     "FAIL_BC"：保存失败
    ''' </returns>
    ''' 创建者：李国栋
    ''' 创建日期：2011-01-13
    Function SaveOppStatus(ByVal sXml As String) As String
        Dim xmlDoc As New XmlDocument
        Dim strSQL As String
        Dim strOppGUID, strStatus, strModifyBy, strModifyOn, strDsType, strDsReason, strDsRemark, strLastDate, strNextDate, strNextContent, strDfNum, strClosedOn As String

        '1.加载数据
        If String.IsNullOrEmpty(sXml) Then
            Return "FAIL_EMPTY"
        End If
        Try
            xmlDoc.LoadXml(sXml)
        Catch ex As Exception
            Return "FAIL_BC"
        End Try
        For Each node As XmlNode In xmlDoc.DocumentElement.ChildNodes
            Select Case node.Name
                Case "OppGUID"  '销售机会GUID
                    strOppGUID = node.InnerText
                    Exit Select
                Case "Status"   '客户状态
                    strStatus = node.InnerText
                    Exit Select
                Case "ModifyBy" '修改人
                    strModifyBy = node.InnerText
                    Exit Select
                Case "ModifyOn" '修改时间
                    strModifyOn = node.InnerText
                    Exit Select
                Case "DsType"   '丢失类型
                    strDsType = node.InnerText
                    Exit Select
                Case "DsReason" '丢失原因
                    strDsReason = node.InnerText
                    Exit Select
                Case "DsRemark" '丢失描述
                    strDsRemark = node.InnerText
                    Exit Select
                Case "LastDate" '最后一次联系
                    strLastDate = node.InnerText
                    Exit Select
                Case "NextDate" '下次跟进日期
                    strNextDate = node.InnerText
                    Exit Select
                Case "NextContent"   '下次跟进内容
                    strNextContent = node.InnerText
                    Exit Select
                Case "DfNum"   '到访次数
                    strDfNum = node.InnerText
                    Exit Select
                Case "ClosedOn" '关闭时间
                    strClosedOn = node.InnerText
                    Exit Select
            End Select
        Next

        '2.保存前校验
        '2.1.“销售机会GUID”、“客户状态”、“修改人”不能为空
        If String.IsNullOrEmpty(strOppGUID) _
            OrElse String.IsNullOrEmpty(strStatus) _
            OrElse String.IsNullOrEmpty(strModifyBy) _
            Then
            Return "FAIL_EMPTY"
        End If
        '2.2.处理可能为空的日期数据
        If String.IsNullOrEmpty(strModifyOn) Then
            strModifyOn = "NULL"
        ElseIf strModifyOn = "getdate()" Then
            strModifyOn = "getdate()"
        Else
            strModifyOn = "'" & strModifyOn & "'"
        End If

        '2.3.处理可能为空的日期数据
        If String.IsNullOrEmpty(strLastDate) Then
            strLastDate = "NULL"
        ElseIf strLastDate = "getdate()" Then
            strLastDate = "CONVERT(VARCHAR(10),GETDATE(),126)"
        Else
            strLastDate = "'" & strLastDate & "'"
        End If

        '3.保存数据
        strSQL = "UPDATE s_Opportunity SET" & _
                        " Status='" & strStatus & "'" & _
                        ",ModifyBy='" & strModifyBy & "'" & _
                        ",ModifyOn=" & strModifyOn & _
                        ",DsType='" & strDsType & "'" & _
                        ",DsReason='" & strDsReason & "'" & _
                        ",DsRemark='" & strDsRemark & "'"
        If strStatus = "丢失" Then
            If String.IsNullOrEmpty(strClosedOn) Then
                strClosedOn = "NULL"
            Else
                strClosedOn = "'" & strClosedOn & "'"
            End If
            strSQL &= ",ClosedOn=" & strClosedOn
        End If


        strSQL &= ",NextDate=" & IIf(String.IsNullOrEmpty(strNextDate), "NULL", String.Format("'{0}'", strNextDate)) & "" & _
                ",NextContent='" & strNextContent & "'" & _
                ",LastDate=" & strLastDate

        '-1表示到访数量不变(分配新交易、重新分配交易)
        If strDfNum <> "-1" Then
            strSQL &= ",DfNum=DfNum+1"
        End If

        strSQL &= " WHERE OppGUID='" & strOppGUID & "'"
        If MyDB.ExecSQL(strSQL) < 0 Then
            Return "FAIL_BC"
        Else
            Return "SUCCESS"
        End If
    End Function

    ''' <summary>
    ''' 判断用户是否销售经理
    ''' </summary>
    ''' <param name="sUserGUID">传入当前用户GUID</param>
    ''' <param name="sFunctionCode">模块Code</param>
    ''' <returns>
    '''    True  销售经理
    '''    False 置业顾问
    ''' </returns>
    ''' 创建者：彭洋
    ''' 创建日期：2011-01-27
    ''' 修改者：马洁
    ''' 修改日期：2011-04-27
    Function IsSaleManager(ByVal sUserGUID As String, ByVal sFunctionCode As String) As Boolean
        If Not String.IsNullOrEmpty(sUserGUID) And Not String.IsNullOrEmpty(sFunctionCode) Then
            '各模块销售经理权限点统一为88
            Return Map.Application.Security.User.CheckUserRight(sUserGUID, sFunctionCode, "88")
        Else
            Return False
        End If
    End Function

    '功能：发生退号、退定、退房 ，关闭当前销售机会
    '参数：sOppGUID － 销售机会GUID
    '原销售机会vb文件转移过来的
    Public Function LostOpp(ByVal sOppGUID As String) As Boolean
        If sOppGUID = "" Then Return False

        '256售楼优化调整 BEING
        '6.如果签约，则需要关闭销售机会
        'Dim strSQL As String = "UPDATE s_Opportunity SET Status ='丢失',StatusReason='取消意向'," & _
        '                "ClosedOn='" & Format(Today(), "yyyy-MM-dd") & "'" & _
        '         " WHERE OppGUID in ('" & sOppGUID.Replace(",", "','") & "')" & _
        '         " AND Status='激活'"
        Dim strSQL As String = "UPDATE s_Opportunity SET Status ='丢失'" & _
                 " WHERE OppGUID in ('" & sOppGUID.Replace(",", "','") & "')" & _
                 " AND Status='激活'"
        '256售楼优化调整 END

        If MyDB.ExecSQL(strSQL) = 0 Then
            Return False
        End If

        Return True
    End Function


End Class
